<template>
	<view class="gui-flex gui-wrap">
		<gui-tags @tapme="tapItem(item)" :key="index" style="margin-top: 20rpx;" :style="{flex:flex}"
			v-for="(item,index) in list" :text="item"
			:customClass="[modelValue  == item ? 'gui-bg-blue':'gui-bg-gray',modelValue  == item ? 'gui-color-white':'gui-color-black','gui-padding-y-small']"
			:size="24"></gui-tags>
	</view>
</template>

<script>
	export default {
		name: "hyb-tags-select",

		props: {
			list: {
				type: Array,
				default: () => {
					return []
				}
			},

			flex: {
				type: String,
				default: ""
			},




			modelValue: {
				type: String,
				default: ""
			}
		},
		data() {
			return {

			};
		},
		methods: {
			tapItem(item) {
				setTimeout(() => {
					this.$emit('input', item)
					this.$emit('update:modelValue', item)
					this.$emit('change', item)
				})
			}
		}
	}
</script>

<style>

</style>